#ifndef ARP_H
#define ARP_H


#include <sys/types.h>
#include <netinet/in.h>

struct  ether_arp {
u_short ar_hrd;         /* format of hardware address */
#define ARPHRD_ETHER    1       /* ethernet hardware format */
#define ARPHRD_IEEE802  6       /* token-ring hardware format */
#define ARPHRD_ARCNET   7       /* arcnet hardware format */
#define ARPHRD_FRELAY   15      /* frame relay hardware format */
#define ARPHRD_ATM2225  19      /* ATM (RFC 2225) */
#define ARPHRD_STRIP    23      /* Ricochet Starmode Radio hardware format */
#define ARPHRD_IEEE1394 24      /* IEEE 1394 (FireWire) hardware format */
       u_short ar_pro;         /* format of protocol address */
       u_char  ar_hln;         /* length of hardware address */
       u_char  ar_pln;         /* length of protocol address */
       u_short ar_op;          /* one of: */
#define ARPOP_REQUEST   1       /* request to resolve address */
#define ARPOP_REPLY     2       /* response to previous request */
#define ARPOP_REVREQUEST 3      /* request protocol address given hardware */
#define ARPOP_REVREPLY  4       /* response giving protocol address */
#define ARPOP_INVREQUEST 8      /* request to identify peer */
#define ARPOP_INVREPLY  9       /* response identifying peer */
#define ARPOP_NAK       10      /* NAK - only valif for ATM ARP */

/*
* The remaining fields are variable in size,
* according to the sizes above.
*/

       u_char	ar_sha[6];	/* sender hardware address */
       u_char	ar_spa[4];	/* sender protocol address */
       u_char	ar_tha[6];	/* target hardware address */
       u_char	ar_tpa[4];	/* target protocol address */
};

#define ARP_HDRLEN	8

#endif // ARP_H
